package org.changs.game.android.utils;

import java.util.HashMap;

public class Trace {

    private static HashMap<String, Long> hashMap = new HashMap<>();


    public static void beginSection(String tag) {
        hashMap.put(tag, System.currentTimeMillis());
    }

    public static void endSection(String tag) {
        Long startTime = hashMap.remove(tag);
        if (startTime != null) {
            AppLogger.d(tag + " over " + (System.currentTimeMillis() - startTime) + "ms");
        }
    }
}
